home *** CD-ROM | disk | FTP | other *** search
/ SunSoft Catalyst CDWARE 1996 May to August / Catalyst CDWARE 1996 May to August.iso / .products / Apertus / _install / install_unbundled < prev    next >
Text File  |  1996-02-12  |  3KB  |  155 lines

  1. #! /bin/sh  
  2. #
  3. #    Installation shell script for Catalyst CDware
  4. #
  5. #     Usage: install_unbundled -m<mountpoint> -p<productpath>
  6. #
  7. #    Created:     June 12, 1991
  8. #    Last Revised:     May 23, 1994
  9. #
  10. #    Use this installation script to install your product from Catalyst CDware
  11. #
  12. #
  13. #    For technical support, please call.
  14. #        +1 415 336.3742 (CDware SPARC) or +1 415 336.3941 (CDware x86)
  15. #
  16. #    get command line parameters
  17. #
  18.  
  19. # function for error exiting
  20.  
  21. end_it () {
  22. echo " "
  23.   echo "Hit return to end ... "
  24.   read answer
  25.  
  26. exit 0
  27. }
  28.  
  29.  
  30. #    set PRODUCT_SIZE to the size of your product in kbytes     
  31.  
  32. PRODUCT_SIZE=8000
  33.  
  34. #
  35. #    get complete paths
  36. #
  37. #
  38. #    get location of installation directory 
  39. ##
  40. echo
  41. echo "This TN3270-X product demo represents just one of many capabilities"
  42. echo "in the EXPRESS product line."
  43. echo
  44. echo "Please enter the absolute path name of the directory structure in which"
  45. echo "you would like to install the EXPRESS TN3270/5250-X"
  46. echo "demonstration and evaluation programs."
  47. echo
  48. echo "Installation directory: "
  49. read INSTALL_DIR
  50.  
  51. #
  52. #    verify the installation directory exists and is a directory
  53. #
  54. if [ ! -d "$INSTALL_DIR" ]
  55. then
  56.     echo "Creating $INSTALL_DIR ..."
  57.     mkdir $INSTALL_DIR
  58.     if [ ! -d "$INSTALL_DIR" ]
  59.     then
  60.         echo
  61.         echo
  62.         echo "Could not create the installation directory."
  63.         echo
  64.         echo "Exiting the installation script."
  65.                 end_it
  66.     fi
  67. fi
  68.  
  69. #
  70. #    verify write permission for the installation directory
  71. #
  72. if [ ! -w "$INSTALL_DIR" ]
  73. then
  74.     echo
  75.     echo
  76.     echo "You do not have write permission for the installation directory: "
  77.     echo $INSTALL_DIR
  78.     echo
  79.         echo
  80.     echo "Exiting the installation script."
  81.         end_it
  82. fi
  83.  
  84. #
  85. #    verify free disk space
  86. #
  87. echo    
  88. echo    "Verifying free disk space..."
  89. FREE_SPACE=0
  90. df=/tmp/FREE.$$
  91. #
  92. # WARNING:
  93. # --------
  94. # For Solaris 2.4, the df line below will need to be updated because
  95. # the standard output of the df command has changed in Solaris 2.4
  96. #
  97. /usr/bin/df -k $INSTALL_DIR | sed /kbytes/d | sed -e '3,$d' | sed -e '1,$s/  */ /g' > $df
  98.  
  99. case `wc -l $df | sed -e 's/^ *//' | cut -f1 -d" " ` in
  100.     1) FREE_SPACE=`cat $df | cut -f4 -d" "` ;; 
  101.     2) FREE_SPACE=`cat $df | sed 1d | sed 's/^ *//' | cut -f3 -d" "` ;; 
  102. esac
  103.  
  104. if [ -n $FREE_SPACE ]
  105. then
  106.     if [ $FREE_SPACE -lt $PRODUCT_SIZE ]
  107.     then
  108.         echo
  109.         echo
  110.         echo "The product installation requires $PRODUCT_SIZE kbytes of"
  111.         echo "free disk space. There is only $FREE_SPACE kbytes of free" 
  112.         echo "disk space in the selected filesystem.  Please free up some"
  113.         echo "disk space and try this installation again."
  114.         echo
  115.         echo "Exiting the installation script."
  116.             end_it     
  117.     fi
  118. fi
  119. /bin/rm $df 2>/dev/null
  120.  
  121. #
  122. #    copy binaries to installation directory
  123. #
  124. echo 
  125. echo "Copying files to "$INSTALL_DIR"..."
  126. echo
  127. #
  128. # uncomment the following line to do the actual copy
  129. #
  130.  
  131. CURRENT_DIR=`pwd`
  132. cd /tmp
  133. zcat $COMPANY_DIR/_demos/eval/TNX.tar.Z | tar xvf -
  134. ./xtninst -dest $INSTALL_DIR
  135. cd $CURRENT_DIR
  136.  
  137. echo
  138. echo "The installation was a success."
  139. echo
  140. echo "Please refer to $INSTALL_DIR/README for how to run EXPRESS TN3270/5250-X"
  141. echo
  142.  
  143.  
  144. #echo
  145. #echo
  146. #echo "To run our product, do the following: "
  147. #echo
  148. #echo "1. Change directories to "$INSTALL_DIR
  149. #echo "2. Run the product by typing ./name_of_file"
  150. #echo
  151. #echo        
  152.  
  153.  
  154. end_it
  155.